package com.system.provider;

import com.am.ui.grid.AbstractBaseGridProvider;
import com.system.uitls.SearchFilter;
import java.util.Map;

public class ReChargeListProvider extends AbstractBaseGridProvider
{
  public String generateSql(Map<String, Object> map)
  {
    StringBuffer sql = new StringBuffer("SELECT r.id,r.person_name,r.user_name,r.receivable_total,r.create_time,p.sex FROM sys_patient_record AS r,sys_person AS p WHERE 1=1 AND r.person_id = p.id AND r.status=7 AND r.receivable_total is not null AND r.person_campus=:campus");
    sql.append(SearchFilter.getSearchSql(map, null));

    sql.append(" ORDER BY create_time desc");
    setParamMap(map);

    return sql.toString();
  }
}